import { deepMix, each } from "@antv/util";

export default G6 => {
  G6.registerNode('base-node', {

    draw(cfg, group) {

      const shape = group.addShape(this.shapeType, {
        name: `${this.shapeType}-shape`,
        xShapeNode: true,
        draggable: true,
        attrs: {
          ...this.getShapeStyle(cfg)
        },
      });

      group.addShape('text', {
        name: 'label-shape',
        xShapeNode: true,
        draggable: true,
        attrs: {
          ...this.getLabelStyle(cfg, cfg.labelCfg, group)
        },
      });

      return shape;
    },

    update(cfg, item) { },

  }, 'anchor-node');

}